//
//  JoinSecondViewController.m
//  消费100
//
//  Created by eliot on 16/3/30.
//  Copyright © 2016年 aleven. All rights reserved.
//

#import "JoinSecondViewController.h"

@interface JoinSecondViewController ()

@end

@implementation JoinSecondViewController

+(JoinSecondViewController*)CreatJoinSecondViewController{
    
    UIStoryboard *story=[UIStoryboard storyboardWithName:@"Main" bundle:nil];
    
    JoinSecondViewController *JoinSecondViewController=[story instantiateViewControllerWithIdentifier:@"JoinSecondViewController"];
    
    return JoinSecondViewController;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.title = @"提现";
    
    /** 设置导航啦样式*/
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:19],NSForegroundColorAttributeName:[UIColor whiteColor]}];
    self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor whiteColor]}];
    self.navigationController.navigationBar.translucent = NO;
    
    UILabel *titleLb =  [[UILabel alloc] init];
    titleLb.font = [UIFont systemFontOfSize:16];
    titleLb.textColor = [UIColor colorWithRed:136/255.0 green:136/255.0 blue:136/255.0 alpha:1];
    titleLb.textAlignment = NSTextAlignmentCenter;
    titleLb.text = @"感谢您的参与\n\n您的排队号为121号，请耐心等待";
    titleLb.numberOfLines = 0;
    [self.view addSubview:titleLb];
    [titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(20);
        if (Width <= 320) {
            make.left.mas_equalTo(20);
            make.right.mas_equalTo(-20);
        }else {
            make.left.mas_equalTo(40/400.0*Width);
            make.right.mas_equalTo(-40/400.0*Width);
        }
        
        make.height.mas_equalTo(100);
    }];
    UIButton *btn = btn = [UIButton buttonWithType:UIButtonTypeCustom];
    [btn setTitle:@"返回" forState:UIControlStateNormal];
    [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    btn.backgroundColor = [UIColor colorWithRed:254/255.0 green:154/255.0 blue:37/255.0 alpha:1];
    [self.view addSubview:btn];
    btn.layer.masksToBounds = YES;
    btn.layer.cornerRadius = 6;
    [btn addTarget:self action:@selector(clickBackBtn) forControlEvents:UIControlEventTouchUpInside];
    [btn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(titleLb.mas_bottom).mas_equalTo(20);
        make.left.mas_equalTo(100 / 320.0 *Width);
        make.right.mas_equalTo(-100 / 320.0 *Width);
        make.height.mas_equalTo(35);
    }];
}

- (void)clickBackBtn {
    [self dismissViewControllerAnimated:YES completion:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
